/**
 * 本文件简单演示封装针对不同功能模块需要与后端交互的接口调用方法封装
 */
import axios from "@/utils/axios";
import* as baseURL from "@/api/url";

// 获取警员信息
export const getPoliceOfficerPage=(params)=> {
    return axios({
        url: baseURL.police_url,
        method: "get",
        params
    });
}
//
// 更新警员信息
export function updatePoliceOfficer(data) {
    return axios({
        url: baseURL.police_edit_url,
        method: "put",
        data
    });
}
// 删除警员信息
export function deletePoliceOfficer(policeOfficerId) {
    return axios({
        url: baseURL.police_delete_url,
        method: "delete",
        params: { policeOfficerId }
    });
}
// 添加警员信息
export function addPoliceOfficer(data) {
    return axios({
        url: baseURL.police_add_url,
        method: "post",
        data
    });
}

//展示账号信息
export function getOfficerAccountPage(params) {
    return axios({
        url: baseURL.police_account_url,
        method: "get",
        params
    });
}

//登录验证
export function login(data) {
    return axios({
        url: baseURL.police_login_url,
        method: "post",
        data
    });
}
//添加账号信息
export function addOfficerAccount(data) {
    return axios({
        url: baseURL.police_account_add_url,
        method: "post",
        data
    });
}
//修改账号信息
export function updateOfficerAccount(data) {
    return axios({
        url: baseURL.police_account_edit_url,
        method: "put",
        data
    });
}
//删除账号信息
export function deleteOfficerAccount(policeAccountId) {
    
    return axios({
        url: baseURL.police_account_delete_url,
        method: "delete",
        params: { policeAccountId }
    });
}